package org.webArchi.common.interceptors;

import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
import com.opensymphony.xwork2.ActionInvocation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


/**
 * @author amith jayasekara
 * This intercepter will be renamed as security interceptor for checking permissions for URLs
 */
public class InitInterceptor extends AbstractInterceptor {
    private static final Logger logger = LoggerFactory.getLogger(InitInterceptor.class);

    @Override
    public String intercept(ActionInvocation actionInvocation) throws Exception {
        try {
            logger.info("-------init interceptor invoked-----");

            return actionInvocation.invoke();
        }
        catch (Exception e) {
            return actionInvocation.invoke();
        }

    }
}
